<template>
	<view>
		<view class="bgws"></view>
		<view v-if="data.name" class="headerbg p30">
			<view class="shopTxt bgw">
				<image :src="data.headImg" mode=""></image>
				<view>
					<p class="p1">
						{{data.name}}
					</p>
					<p class="p2">
						{{data.category.name}}
						<!-- 评分4.9 
						收藏量20 -->
					</p>
				</view>
			</view>
		</view> 
		<view class="nav">
			<view class="title">
				必备工具
			</view>
			<view class="navList">
				<view @tap="go('../CreateShop/CreateShop?isStore=true')">
					<image src="../../static/my/dianpuziliao.png" mode=""></image>
					店铺资料
				</view>
				<view  @tap="go('../myProducts/myProducts')"> 
					<image src="../../static/my/shangpinguanli.png" mode=""></image>
					商品管理
				</view>
				<view @tap="go('../sortSet/sortSet')">
					<image src="../../static/my/fenleiguanli.png" mode=""></image>
					分类管理
				</view>
				<view @tap="go('../sell/sell?state=true')">
					<image src="../../static/my/dingdanguanli.png" mode=""></image>
					订单管理
				</view>
				<view @tap="go('../discount/discount')">
					<image src="../../static/my/manjianhuodong.png" mode=""></image>
					满减活动
				</view>  
			</view>
		</view>
		
	</view>
</template>

<script>
	import {storePersonalStore} from '@/api/api.js'
	export default {
		data() {
			return {
				data:[]
			};
		},
		onShow() {
			this.init()
		},
		methods:{
			async init(){
				let data = await storePersonalStore()
				this.data = data.data
			},
			go(url){
				this.$navigateTo(url)
			}
		}
	}
</script>

<style lang="less" scoped>
body{
	background: white;
}
uni-page-body{
	background: white;
}
.headerbg{
	height: 160rpx;
	background: #1BBF80; 
	box-sizing: border-box;
	padding-top: 60rpx;
}
.shopTxt{
	display: flex;
	padding: 30rpx;  
	border-radius: 20rpx; 
	box-shadow: 0px 0px 27rpx 0px rgba(0, 0, 0, 0.09);
	image{
		width: 120rpx;
		height: 120rpx;
		border-radius: 10rpx;
		margin-right: 20rpx;
	}
	.p1{ 
		font-size: 38rpx; 
		font-weight: bold;
		color: #1A1A1A;
	}
	.p2{ 
		font-size: 26rpx; 
		color: #666666;
		margin-top: 10rpx;
	}
}
.nav{
	margin-top: 160rpx; 
	.title{ 
		font-size: 36rpx; 
		font-weight: bold;
		color: #333333;
		padding-left: 30rpx;
		margin-bottom: 40rpx;
	}
	.navList{
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		view{
			width: 210rpx;
			height: 210rpx;
			background: #F8F8F8;
			border-radius: 10rpx;
			margin-left: 30rpx;
			text-align: center;
			padding-top: 50rpx;
			margin-bottom: 30rpx;
		}
		image{
			width: 60rpx;
			height: 60rpx;
			display: block;
			margin: auto;
			margin-bottom: 16rpx;
		}
	}
}
</style>
